package com.ruoyi.asset.maintenance.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.asset.maintenance.domain.IntegratedMaintenance;
import com.ruoyi.asset.maintenance.domain.bo.IntegratedMaintenanceBo;
import com.ruoyi.asset.maintenance.domain.bo.MaintenanceProjectTypeBo;
import com.ruoyi.asset.maintenance.domain.bo.MaintenanceStatisticsBo;
import com.ruoyi.asset.maintenance.domain.vo.IntegratedMaintenanceVo;
import com.ruoyi.asset.maintenance.domain.vo.MaintenanceCommunityCountVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 一体化维护管养
 *
 * @author 12276
 */
public interface IntegratedMaintenanceMapper extends BaseMapperPlus<IntegratedMaintenanceMapper, IntegratedMaintenance, IntegratedMaintenanceVo> {

    /**
     * 删除一体化维护管养
     */
    int logicDeleteMaintenance(@Param("idsSet") Set<Long> idsSet);

    /**
     * 分页查询一体化维护管养管理范围
     */
    Page<IntegratedMaintenanceVo> selectMaintenance(IPage<IntegratedMaintenanceVo> page, @Param("searchBo") IntegratedMaintenanceBo searchBo);

    /**
     * 查询一体化维护管养管理范围
     */
    List<IntegratedMaintenanceVo> exportMaintenance(@Param("searchBo") IntegratedMaintenanceBo searchBo);

    /**
     * 首页统计
     *
     * @return
     */
    Integer selectCount();

     List<MaintenanceProjectTypeBo> selectCommunityCount(@Param("community") String community);

    List<MaintenanceProjectTypeBo> selectByCommunityAndDateCount(@Param("community") String community, @Param("date")String date);

    Integer selectMaintenanceCountByCommunity(@Param("date") String date,@Param("community") String community);

    List<Integer> selectSumDate(@Param("date") String date);
}
